<!DOCTYPE html>
<!--suppress ALL-->
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('编辑')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-action-edit" th:object="${data}">
        <input type="hidden" id="id" name="id" th:field="*{id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">名称：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="name" name="name" placeholder="请输入名称" th:field="*{name}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">别名：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="otherName" name="otherName" placeholder="请输入别名"
                       th:field="*{otherName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">缩略图：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="img" name="img" placeholder="请输入缩略图" th:field="*{img}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">剧情介绍：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="content" name="content" placeholder="请输入剧情介绍"
                       th:field="*{content}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">更新信息：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="updateInfomation" name="updateInfomation"
                       placeholder="请输入更新信息" th:field="*{updateInfomation}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">导演：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="director" name="director" placeholder="请输入导演"
                       th:field="*{director}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">演员：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="performer" name="performer" placeholder="请输入演员"
                       th:field="*{performer}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">国家：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="countryId" name="countryId" placeholder="请输入国家"
                       th:field="*{countryId}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">国家：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="countryName" name="countryName" placeholder="请输入国家"
                       th:field="*{countryName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">一级分类：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="oneTypeId" name="oneTypeId" placeholder="请输入一级分类"
                       th:field="*{oneTypeId}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">一级分类：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="oneTypeName" name="oneTypeName" placeholder="请输入一级分类"
                       th:field="*{oneTypeName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">二级分类：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="twoTypeId" name="twoTypeId" placeholder="请输入二级分类"
                       th:field="*{twoTypeId}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="twoTypeName" name="twoTypeName" placeholder="请输入类型"
                       th:field="*{twoTypeName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">语言：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="languageId" name="languageId" placeholder="请输入语言"
                       th:field="*{languageId}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">语言：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="languageName" name="languageName" placeholder="请输入语言"
                       th:field="*{languageName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">上映时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="releaseTime" name="releaseTime" placeholder="请输入上映时间"
                       th:field="*{releaseTime}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">片长：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="longTime" name="longTime" placeholder="请输入片长"
                       th:field="*{longTime}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">播放数量：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="playCount" name="playCount" placeholder="请输入播放数量"
                       th:field="*{playCount}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">今日播放数量：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="todayPlayCount" name="todayPlayCount"
                       placeholder="请输入今日播放数量" th:field="*{todayPlayCount}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">明细数量：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="detailCount" name="detailCount" placeholder="请输入明细数量"
                       th:field="*{detailCount}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分数：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" id="score" name="score" placeholder="请输入分数" th:field="*{score}">
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "ajax/mfilm";
    let id = [[${data.id}]];
    let ajaxUrl = prefix + "/edit";
    if (id == 0) {
        ajaxUrl = prefix + "/add";
    }

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(ajaxUrl, $('#form-action-edit').serialize());
        }
    }
</script>
</body>
</html>
